import request from "../util/request";

/**
 * 新菜单
 * @type {{}}
 */
export const newMenu = {
    id: null,
    parentId: null,
    title: '',
    name: '',
    path: '',
    perms: '',
    component: '',
    type: 0,
    icon: '',
    ordernum: 1
}

/**
 * 获取菜单列表
 */
export const getMenuList = function () {
    return request.get('/menu/list')
}

/**
 * 根据编号删除菜单
 * @param menuId
 * @returns {Promise<AxiosResponse<any>>}
 */
export const deleteMenuById = (menuId) => {
    return request.delete(`/menu/delete/${menuId}`)
}